找传奇、传世资源到传世资源站!

在线查看pdf文件例子源码(FlexPaper实现)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

同时含(doc转swf代码)
在线查看pdf文件例子源码(FlexPaper实现) C#语言基础-第1张
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Diagnostics;using System.IO;public partial class Pdf2Swf : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string sWebPath = Request.MapPath(""); string sFile = sWebPath "\\" TextBox1.Text; string dFile = sFile.Replace(".pdf", ".swf"); if (!File.Exists(dFile)) { if (!Doc2Swf("c:\\swftools\\pdf2swf.exe", sFile, dFile)) { Response.Write("该文档被加密,不能转换!"); } } } /// <summary> /// 将pdf等转换为swf文件 /// </summary> /// <param name="appPath">转换程序路径</param> /// <param name="Source">源文件</param> /// <param name="Des">目标文件</param> /// <returns></returns> private Boolean Doc2Swf(string appPath, string Source, string Des) { Process pc = new Process(); ProcessStartInfo psi = new ProcessStartInfo(appPath, Source " " Des); try { pc.StartInfo = psi; pc.Start(); pc.WaitForExit(); } catch { return false; throw; } finally { pc.Close(); } return File.Exists(Des); }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复